/**************************************************************
 * Name:      mSolver.h
 * Purpose:   to solve single line wxstring math calculation
 * Author:    Riku Maikola (rpm@ac-mapa.org)
 * Created:   2013-08-31
 * Copyright: Riku Maikola (rpm.ac-mapa.org)
 * License:
 **************************************************************/

#ifndef mSolver_H
#define mSolver_H

#include "mMath.h"
#include <iostream>

class mSolver
{
public:
    wxArrayString P;   //parts..
    double *V;

    mSolver() {};
    void SetSolverV(double *);          //SET SOLVERS DOUBLE ARRAY POINTER

    //parse given text
    void Parse(wxString);
    bool EVA();
    bool IsConstant(uint a);
    double ToDouble(wxString P);
    wxString GetString();       //get full line..
    double calc(wxString str);  //full line solve... and force double output
};
#endif
